"""plot the computed edge curvature"""
import matplotlib.pyplot as plt
import networkx as nx

from geometric_clustering import load_curvature, plotting


if __name__ == "__main__":
    graph = nx.read_gpickle("graph_powergrid.gpickle")

    times, kappas = load_curvature(filename="curvature.pkl")

    plotting.plot_edge_curvatures(times, kappas, folder=".", ext=".pdf")
    plotting.plot_edge_curvature_variance(times, kappas, folder=".", ext=".pdf")
    plt.show()

    plotting.plot_graph_snapshots(
        graph, times, kappas, folder="curvature_images", ext=".pdf", figsize=(12, 7)
    )
